package com.liu.zuihou.util;

import com.auth0.jwt.interfaces.Claim;
import org.springframework.security.core.userdetails.User;

import java.util.Map;

public class Test {
    public static void main(String[] args) {
        User user = (User)User.withUsername("张三")
                .username("张三")
                .password("123")
                .authorities("USER")
                .build();
        String token = JwtUtil.createJwt(user);
        System.out.println(token);
        Map<String, Claim> claimMap = JwtUtil.resolveJwt(token);
        System.out.println(claimMap);
    }
}
